package com.huatai.bpmn.controller;


import com.huatai.bpmn.entity.DepartmentEntity;
import com.huatai.bpmn.service.DepartmentService;
import com.huatai.common.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 部门表 前端控制器
 * </p>
 *
 * @author yxy
 * @since 2023-09-20
 */
@RestController
@RequestMapping("/department")
@Api(value = "部门信息",tags ="部门信息" )
public class DepartmentController {

	@Autowired
	private DepartmentService departmentService;

	@GetMapping("/list")
	@ApiOperation("部门列表")
	public R list(){
		List<DepartmentEntity> list = departmentService.list();
		return R.data(list);
	}



}

